package com.qf.service.impl;

import com.qf.dao.SetMealLook;
import com.qf.entity.CheckGroup;
import com.qf.entity.SetMeal;
import com.qf.service.SetMealLookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


//编辑按钮回显
@Transactional(rollbackFor=Exception.class)
@Service
public class SerMealLookServicelmpl implements SetMealLookService {
    @Autowired
    private SetMealLook setMealLook;


    @Override
    public SetMeal findById(Integer id) {
        SetMeal byId = setMealLook.findById(id);
        return byId;
    }

    @Override
    public List<CheckGroup> findByNo() {
        List<CheckGroup> allGroup = setMealLook.findAllGroup();
        return allGroup;
    }

    @Override
    public List<Integer> findByGroupId(Integer id) {

        List<Integer> allGroupId = setMealLook.findAllGroupId(id);

        return allGroupId;
    }


}
